Skip to content

Added step outline Tree View ordered by DAG structure#11

Open
Nandinisaagar wants to merge 1 commit intoouterbounds:mainfrom
Nandinisaagar:nandinisaagar
Open

Added step outline Tree View ordered by DAG structure#11
Nandinisaagar wants to merge 1 commit intoouterbounds:mainfrom
Nandinisaagar:nandinisaagar

Conversation

@Nandinisaagar
Copy link
Copy Markdown

@Nandinisaagar Nandinisaagar commented Mar 2, 2026

Resolves Issue #5

Deliverables Checklist :

  • Creates a DAG tree-sitter view for the extension
  • Adds navigation to the code components
  • Add visual distinction for the different type of nodes

closes #5

Proposed Approach :

Screenshot 2026-03-01 at 1 24 46 PM

Reasoning :

For the DAG parsing specifically, I considered three approaches:

  • Regex: Rejected this approach because it breaks on multiline self.next() calls and can't tell if a method is inside a FlowSpec subclass or some unrelated class.
  • Runtime import & inspecting: Rejected the approach because it actually executes the file, requires the user's full environment, and could have side effects just from opening a flow in the editor.
  • ast module: This is the chosen approach as it is the safest approach with zero dependencies, and handles multiline calls naturally since the AST already structures them. A known tradeoff is that the dynamically constructed self.next() calls won't resolve since we never execute the file, but this pattern is rare in practice and worth documenting rather than working around.

For Ordering,

  • DFS gives valid topological order but interleaves branch steps confusingly (start → process_a → join → process_b).
  • BFS naturally groups parallel steps at the same depth, which matches how a developer mentally reads a flow.

Implementation Breakdown :

Screenshot 2026-03-01 at 2 52 10 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Step outline tree view ordered by DAG structure

1 participant